package com.woniu.aimd.mapper;

import com.woniu.aimd.pojo.DTO.ClassBaseinfoDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ClassMapper {
    @Select("select classId,major,termNumber,createdTime from class where classId=#{classId} ")
    ClassBaseinfoDTO getClassInfoById(Integer classId);
    @Select("select  classId from  class where major = #{major}  order by  termNumber desc limit 1")
    String  getCurrentClassIdByMajor(String major);
}
